package com.ctu.gzero.compose
{
	import flash.text.engine.TextLine;
	
	public class TxLineSegment
	{
		public var startX:Number;
		public var endX:Number;
		private var _textLine:TextLine;
		private var _lineBeginIndex:int;
		private var _textLength:int;
		
		public function TxLineSegment(startX:Number = 0, endX:Number = 0)
		{
			this.startX = startX;
			this.endX = endX;
		}
		
		public function get textLength():int
		{
			return _textLine.rawTextLength;
		}
		
		public function get lineBeginIndex():int
		{
			return _lineBeginIndex;
		}
		
		public function set lineBeginIndex(val:int):void
		{
			_lineBeginIndex = val;
		}
		
		public function get textLine():TextLine
		{
			return _textLine;
		}
		
		public function set textLine(val:TextLine):void
		{
			_textLine = val;
		}
		
		public function toString():String
		{
			return " " + startX + ":" + endX;
		}
	}
}